function getAddstress() {
    $("#location").text("正在获取地址.....");
    var baiduLocation = api.require('baiduLocation');
    var map = api.require('baiduMap');
    baiduLocation.startLocation({
        accuracy: '100m',
        filter: 1,
        autoStop: true

    }, function(ret, err) {
        var sta = ret.status;
        var lat = ret.latitude;
        var lon = ret.longitude;
        if (ret.status) {
            $("input[name=coodinate]").val(lat + " , " + lon);
            $.ajax({
                url: "http://api.map.baidu.com/geocoder/v2/",
                type: "post",
                dataType: "jsonp",
                data: {
                    callback: "renderReverse",
                    location: lat + "," + lon,
                    output: "json",
                    ak: "QIy6e2gLyrCP64dbB9HvoF3nQRuf6Ccq",
                },
                success: function(data) {

                    // var result = eval("("+data+")");
                    if (data.status == 0) {
                        var street_number = data.result.addressComponent.street_number; //街道门牌号
                        var street = data.result.addressComponent.street; //街道
                        var town = data.result.addressComponent.town; //乡镇名
                        var district = data.result.addressComponent.district; //区县名
                        var city = data.result.addressComponent.city; //城市名
                        var province = data.result.addressComponent.province; //省名
                        $("input[name=place]").val(street);
                        $("#location").text(street);
                    } else {
                        alert("获取地址失败，请重新获取");
                    }

                }
            });
            return false;

        } else {
            alert(JSON.stringify(err));
        }
    });

}
